package a.stategy;

/**
 * 现金收费工厂类
 */
public class CashFactory {
    public static CashSuper createCash(String type){
        CashSuper cs=null;
        switch (type){
            case "正常收费":
                cs=new CashNormal();
                break;
            case "打八折":
                cs=new CashRebate("0.8");
                break;
            case "返利":
                cs=new CashReturn(300,100);
                break;
        }
        return cs;
    }

}
